package com.xbongbong.pro.message.feign;

import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.statistic.result.pojo.SalesReportPojo;
import com.xbongbong.pro.statistic.result.pojo.vo.SalesReportVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zcp
 * @version v1.0
 * @date 2019/4/15 16:13
 * @since v1.0
 */
@FeignClient(name = "pro-web-statistics",contextId = "salesReportFeignClient")
public interface SalesReportFeignClient {

    /**
     * 在tb_chart表无记录，只是写死的一些条件进入，获取一些数值型系统指标的统计结果
     * @param salesReportPojo
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<com.xbongbong.pro.statistic.result.pojo.vo.SalesReportVO>
     * @author zcp
     * @date 2019/4/15 16:20
     * @since v1.0
     * @version v1.0
     */
    @RequestMapping(value = "/pro/v1/chart/result/feign/salesReport", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<SalesReportVO> chartResultSalesReport(@RequestBody SalesReportPojo salesReportPojo, @RequestParam("lang") String lang);
}
